﻿<navigation:Page 
    x:Class="Perspective.Demo.View.Matrix3DDemo" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:swc="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    mc:Ignorable="d"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    d:DesignWidth="640" d:DesignHeight="480"
    Loaded="Page_Loaded"
    Title="Perspective : Matrix3D">
    <navigation:Page.Resources>
        <Style TargetType="Image">
            <Setter Property="Stretch" Value="None" />
        </Style>
        <Style TargetType="Grid" >
            <Setter Property="Width" Value="800" />
            <Setter Property="Height" Value="600" />
            <Setter Property="Margin" Value="10" />
        </Style>
        <Style x:Key="ShapeStyle" TargetType="Shape" >
            <Setter Property="Fill" Value="Red"/>
            <Setter Property="Stroke" Value="Black"/>
        </Style>
        <Style TargetType="Line" BasedOn="{StaticResource ShapeStyle}">
        </Style>
        <Style TargetType="Rectangle" BasedOn="{StaticResource ShapeStyle}">
            <Setter Property="Width" Value="160"/>
            <Setter Property="Height" Value="100"/>
        </Style>
        <Style 
            x:Key="DotLineStyle"
            TargetType="Line" >
            <Setter Property="Stroke" Value="Black" />
            <Setter Property="StrokeThickness" Value="5" />
            <Setter Property="StrokeDashCap" Value="Triangle" />
            <Setter Property="X2" Value="440" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </navigation:Page.Resources>
    <swc:TabControl>
        <swc:TabItem Header="PlaneProjection RY30">
            <Grid>
                <Image
                    Source="http://www.odewit.net/Images/Demo/Eoliennes01-s400.jpg">
                    <Image.Projection>
                        <PlaneProjection
                            CenterOfRotationX="1"
                            RotationY="30"/>
                    </Image.Projection>
                </Image>
                <Line
                    Style="{StaticResource DotLineStyle}"
                    StrokeDashArray="4 3"
                    X2="0"                    
                    Y2="300">
                    <Line.RenderTransform>
                        <TranslateTransform X="200"/>
                    </Line.RenderTransform>
                </Line>
            </Grid>
        </swc:TabItem>
        <swc:TabItem Header="Matrix3DProjection RY30">
            <Grid>
                <Image 
                    Name="image10" 
                    Opacity="0.85"
                    Source="http://www.odewit.net/Images/Demo/Colorado02-s400.jpg"
                    ImageOpened="image10_ImageOpened"/>
                <Line
                    Style="{StaticResource DotLineStyle}"
                    StrokeDashArray="4 3"
                    X2="0"                    
                    Y2="300">
                    <Line.RenderTransform>
                        <TranslateTransform X="200"/>
                    </Line.RenderTransform>
                </Line>
            </Grid>
        </swc:TabItem>
        <swc:TabItem Header="TextBlock RY45">
            <Canvas>
                <TextBlock
                    Name="tb10"
                    Canvas.Left="100"
                    Canvas.Top="100"
                    Width="200" 
                    Height="180" 
                    Padding="10"
                    FontFamily="Georgia" 
                    FontSize="18"
                    FontStyle="Italic"
                    Foreground="DarkBlue"
                    TextAlignment="Center"
                    TextWrapping="Wrap"
                    LineHeight="30">
                    Les polices supportées par défaut par le runtime Silverlight sont Arial, Arial Black, Comic Sans MS, Courier New, Georgia, Lucida Grande/Lucida Sans Unicode, Times New Roman, Trebuchet MS et Verdana. D’autres polices spécifiques aux alphabets orientaux sont supportées.
                </TextBlock>
            </Canvas>
        </swc:TabItem>
        <swc:TabItem Header="Rectangle RZ30">
            <Grid LayoutUpdated="Grid_LayoutUpdated">
                <Rectangle Name="r10"/>
            </Grid>
        </swc:TabItem>
    </swc:TabControl>
</navigation:Page>
